Environmental compensation